]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
style: Fix osd elements not being dark in light theme
authorSam Hewitt <sam@snwh.org>
Tue, 18 Jul 2023 13:00:50 +0000 (10:30 -0230)
committerMarge Bot <marge-bot@gnome.org>
Wed, 2 Aug 2023 20:05:39 +0000 (20:05 +0000)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2823>

data/theme/gnome-shell-sass/_colors.scss
data/theme/gnome-shell-sass/_common.scss
data/theme/gnome-shell-sass/_drawing.scss

index ecc24d954d2105d78959037a328b18ada925b9df..ebb9a0171264e1b19dc1e6b01a8027290b1f31bd 100644 (file)
@@ -28,8 +28,8 @@ $success_color: if($variant == 'light', $green_4, $green_5);
 $destructive_color: $error_color;
 
 // color definitions for OSD elements
-$osd_fg_color: if($variant == 'light', $_dark_base_color, $light_1);
-$osd_bg_color: if($variant == 'light', $light_3, lighten($_dark_base_color, 5%));
+$osd_fg_color: $light_1;
+$osd_bg_color: lighten($_dark_base_color, 5%);
 
 // derived osd colors
 $osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
index c64616c3ff2cf99788e577223bd28b0d9f0fe5fb..ecd39c757dd853f97bc52c982f58405d42e5471c 100644 (file)
@@ -259,18 +259,18 @@ stage {
 // buttons on OSD elements
 %osd_button {
   @extend %button_common;
-  @include button(normal, $tc:$osd_fg_color, $c:$osd_bg_color);
-  &:insensitive { @include button(insensitive, $tc:$osd_fg_color, $c:$osd_bg_color);}
-  &:focus { @include button(focus, $tc:$osd_fg_color, $c:$osd_bg_color);}
-  &:hover { @include button(hover, $tc:$osd_fg_color, $c:$osd_bg_color);}
-  &:active { @include button(active, $tc:$osd_fg_color, $c:$osd_bg_color);}
-  &:outlined,&:checked { @include button(checked, $tc:$osd_fg_color, $c:$osd_bg_color);}
+  @include button(normal, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);
+  &:insensitive { @include button(insensitive, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);}
+  &:focus { @include button(focus, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);}
+  &:hover { @include button(hover, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);}
+  &:active { @include button(active, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);}
+  &:outlined,&:checked { @include button(checked, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);}
 }
 
 %osd_button_flat {
   @extend %osd_button;
-  @include button(undecorated);
-  &:insensitive { @include button(undecorated, $tc:$osd_fg_color, $c:$osd_bg_color);}
+  @include button(undecorated, $osd:true);
+  &:insensitive { @include button(undecorated, $tc:$osd_fg_color, $c:$osd_bg_color, $osd:true);}
 }
 
 /* System Elements */
index cb77411c468f88b82b97247884eacf5d5aa2264e..5606666d6c473386b3cea513091894a489cefde9 100644 (file)
 //
 // since buttons are all flat an borderless now the mixin is simpler
 
-@mixin button($t, $tc:$fg_color, $c:$bg_color, $flat: false) {
+@mixin button($t, $tc:$fg_color, $c:$bg_color, $flat: false, $osd: false) {
 
   $button_bg_color: mix($tc, $c, $button_mix_factor);
   transition-duration: 100ms;
 
+  @if $osd {
+    $button_bg_color: transparentize($tc, 0.9);
+  }
+
   // normal button
   @if $t==normal {
     color: $tc;
 
   // insensitive button
   @else if $t==insensitive {
+    color: if($variant == 'light', transparentize($tc, .6), transparentize($tc, .5)) !important;
     background-color: if($variant == 'light', transparentize($tc, .9), transparentize($tc, .95));
-    color: if($variant == 'light', transparentize($tc, .6), transparentize($tc, .5));
   }
 
   // default/suggested button
     background-color: none;
     box-shadow: none;
     &:insensitive {
-      @include button(insensitive);
       background-color: transparent;
     }
   }